<?php
Zend_Loader::loadClass('Zend_Validate_Int');
Zend_Loader::loadClass('Lead_Validate_GreaterThanOrEqual');
Zend_Loader::loadClass('Lead_Validate_LessThanOrEqual');

class Lead_EDO_Datatype_Validator_Smallint implements Lead_EDO_Datatype_Validator_Interface
{
    
    static public function get(Lead_EDO_Datatype_Field_Interface $field)
    {
        
        $validatorChain = new Zend_Validate();
        $validatorChain->addValidator(new Zend_Validate_Int())
            ->addValidator(new Lead_Validate_GreaterThanOrEqual(-32768))
            ->addValidator(new Lead_Validate_LessThanOrEqual(32768));

        return $validatorChain;
        
    }
    
    
}